<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <style>
    body {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
    }

    .container {
      position: relative;
    }

    .wrapper {
      width: 10rem;
      height: 10rem;
      background-color: #51f;
      border-radius: 3rem;
      /* border-bottom-right-radius: 6rem; */
      position: absolute;
      animation: rotateBox linear 10s infinite;
    }

    @keyframes rotateBox {
      0% {
        transform: rotateZ(0deg);
      }

      100% {
        transform: rotateZ(360deg);
      }
    }

    /* .wrapper::before {
        content: "";
        width: 10rem;
        height: 10rem;
        position: absolute;
        background-color: attr(data-bgc);
        border-radius: 3rem / 5rem;
        opacity: 0.5;
      } */
    .wrapper::before {
      /* content: "->" attr(data-bgc); */
      /* color: val(attr(data-bgc)); */
      position: absolute;
      /* background-color: attr(data-bgc); */
    }

    .other {
      transform: translate(-10rem, 0rem) rotateZ(120deg);
      animation: rotateBox linear 10s 1s infinite;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="wrapper" data-delay="1" data-bgc="#faa"></div>
    <div class="wrapper other"></div>
  </div>
</body>

</html>